package com.ang.demo;

import java.util.concurrent.Callable;

public class Test01 {

    private Callable<String> test0(String cardNumber) {
        Callable<String> callable = new Callable<String>() {
            @Override
            public String call() throws Exception {
                return cardNumber;
            }
        };

        return callable;
    }

    private Callable<String> test1(String cardNumber) {
        Callable<Integer> callable = ()->{
            return 1;
        };

        Callable<String> callable1 = ()->{
            return cardNumber;
        };

        return callable1;
    }

    private Callable<String> test2(String cardNumber) {
        Callable<String> callable = () -> {
            try {
                return cardNumber;
            } catch (Throwable throwable) {
                return cardNumber;
            }
        };

        return callable;
    }

    private Callable<String> test3(String cardNumber) {
        return () -> {
            try {
                return cardNumber;
            } catch (Throwable throwable) {
                return cardNumber;
            }
        };
    }
}
